from sklearn.ensemble import GradientBoostingClassifier
# from sklearn.ensemble import AdaBoostRegressor
from sklearn.datasets import load_iris
from matplotlib import pyplot as plt
iris = load_iris()
X = iris.data
y = iris.target
GBC = GradientBoostingClassifier()
GBC.fit(X, y)

print('多少棵树:', len(GBC.estimators_), '第一棵树:', GBC.estimators_[0])
plt.plot(GBC.train_score_)
plt.show()